package com.falcon.modules.domain.bo;

import lombok.Data;

import java.io.Serializable;
import java.util.List;


/**
 * Created by taifuyu on 18/7/16.
 */
@Data
public class RoleMenuBo implements Serializable, Comparable<RoleMenuBo> {

    private Long id;
    private String name;
    private List<RoleMenuBo> children;
    private Long sort;

    @Override
    public int compareTo(RoleMenuBo o) {
        if(o==null){
            return 1;
        }
        if(this.sort > o.getSort()){
            return 1;
        }
        if(this.sort < o.getSort()){
            return -1;
        }
        return 0;
    }
}
